package com.bawei.a2010douyin.ui.shopping;

import android.widget.ImageView;

import com.bawei.a2010douyin.R;
import com.bawei.a2010douyin.base.mvp.BaseView;
import com.bawei.a2010douyin.base.utils.GlideUtils;
import com.bawei.a2010douyin.entity.GoodsEntity;
import com.bawei.a2010douyin.entity.VideoEntity;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import androidx.annotation.NonNull;

public class ShoppingAdapter extends BaseQuickAdapter<GoodsEntity, BaseViewHolder> {

    public ShoppingAdapter(int layoutResId) {
        super(layoutResId);
    }
    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, GoodsEntity goodsEntity) {
        ImageView imageView = baseViewHolder.getView(R.id.iv);
        GlideUtils.getInstance().loadRoundedImage(getContext(),goodsEntity.getGoods_default_icon(),imageView,10);
        baseViewHolder.setText(R.id.tv_desc,goodsEntity.getGoods_desc()+"");
        baseViewHolder.setText(R.id.tv_price,"原价：¥"+goodsEntity.getGoods_default_price());

    }
}
